package xkp.lesson.entity;

import lombok.Data;
import org.springframework.beans.factory.FactoryBean;

@Data
public class PersonFactoryBean implements FactoryBean<Person> {
    private String name;
    private int age;
    private double money;



    @Override
    public Person getObject() throws Exception {
        return new Person().setName(name).setAge(age).setMoney(money);
    }

    @Override
    public Class<?> getObjectType() {
        return Person.class;
    }

    @Override
    public boolean isSingleton() {
        return true;
    }
}
